<div id="main_content" class="other">
    <h3><?php echo $title; ?></h3>
    <a href="<?php echo base_url('/shift-info'); ?>" class="btn addEmoloyeeBack m10"><?php echo $lblBack; ?></a>
    <div class="form_add">  
        <form action="" method="post">
            <table border="0" class="add_data">     
                <tr>
                    <td align="right"><label class="cola"><?php echo $lblShiftName; ?><font color="#FF0000">(*)</font></label></td>
                    <td>
                        <input type="text" name="txtShiftName" size="30" maxlength="255" value="<?php echo $txtShiftName; ?>" />
                    </td>
                    <td><div class="error"><?php echo form_error('txtShiftName'); ?></div></td>

                </tr>
                <tr>
                    <td align="right"><label class="cola"><?php echo $lblTotalWorkHours; ?> <font color="#FF0000">(*)</font></label></td>
                    <td><input type="text" name="txtTotalWorkHours" size="20" maxlength="5" value="<?php echo $txtTotalWorkHours; ?>" />&nbsp;&nbsp;<label><?php echo $this->lang->line('Sif_h'); ?></label></td>
                    <td><div class="error"><?php echo form_error('txtTotalWorkHours'); ?></div></td>
                </tr>
                <tr>
                    <td align="right"><label class="cola"><?php echo $lblStarttime; ?> <font color="#FF0000">(*)</font> </label></td>
                    <td><input type="text" name="txtStartTime" size="20" maxlength="5" value="<?php echo $txtStartTime; ?>" /><i>(<?php echo $this->lang->line('formatTime'); ?>)</i></td>
                    <td><div class="error"><?php echo form_error('txtStartTime'); ?></div></td>
                </tr>
                <tr>
                    <td align="right">
                        <label class="cola"><?php echo $lblEndtime; ?> <font color="#FF0000">(*)</font> </label>
                    </td>
                    <td><input type="text" name="txtEndTime" size="20" maxlength="5" value="<?php echo $txtEndTime; ?>" /><i>(<?php echo $this->lang->line('formatTime'); ?>)</i></td>
                    <td><div class="error"><?php echo form_error('txtEndTime'); ?></div></td>
                </tr>
                <tr>
                    <td align="right"><label class="cola"><?php echo $lblStartRestTime1; ?> <font color="#FF0000">(*)</font> </label></td>
                    <td><input type="text" name="txtStartRestTime1" size="20" maxlength="5" value="<?php echo $txtStartRestTime1; ?>" /><i>(<?php echo $this->lang->line('formatTime'); ?>)</i></td>
                    <td><div class="error"><?php echo form_error('txtStartRestTime1'); ?></div></td>
                </tr>
                <tr>
                    <td align="right"><label class="cola"><?php echo $lblEndRestTime1; ?> <font color="#FF0000">(*)</font> </label></td>
                    <td><input type="text" name="txtEndRestTime1" size="20" maxlength="5" value="<?php echo $txtEndRestTime1; ?>" /><i>(<?php echo $this->lang->line('formatTime'); ?>)</i></td>
                    <td><div class="error"><?php echo form_error('txtEndRestTime1'); ?></div></td>
                </tr>
                <tr>
                    <td align="right"><label class="cola"><?php echo $lblRestime2; ?> <font color="#FF0000">(*)</font> </label></td>
                    <td><input type="text" name="txtRestTime2" size="20" maxlength="3" value="<?php echo $txtRestTime2; ?>" />&nbsp;&nbsp;<label><?php echo $this->lang->line('Sif_m'); ?></label></td>
                    <td><div class="error"><?php echo form_error('txtRestTime2'); ?></div></td>
                </tr>            
                <tr>
                    <td align="right"><label class="cola"><?php echo $lblEndEveningOvertime; ?> <font color="#FF0000">(*)</font></label></td>
                    <td><input type="text" name="txtEndEveningOvertime" size="20" maxlength="5" value="<?php echo $txtEndEveningOvertime; ?>" /><i>(<?php echo $this->lang->line('formatTime'); ?>)</i></td>
                    <td><div class="error"><?php echo form_error('txtEndEveningOvertime'); ?></div></td>
                </tr>
                <tr>
                    <td align="right"><label class="cola"><?php echo $lblRestime3; ?> <font color="#FF0000">(*)</font></label></td>
                    <td><input type="text" name="txtRestTime3" size="20" maxlength="3" value="<?php echo $txtRestTime3; ?>" />&nbsp;&nbsp;<label><?php echo $this->lang->line('Sif_m'); ?></label></td>
                    <td><div class="error"><?php echo form_error('txtRestTime3'); ?></div></td>
                </tr>
                <tr>
                    <td align="right"><label class="cola"><?php echo $lblRoundedTimeBlock; ?> <font color="#FF0000">(*)</font></label></td>
                    <td><input type="text" name="txtRoundedTimeBlock" size="20" maxlength="3" value="<?php echo $txtRoundedTimeBlock; ?>" />&nbsp;&nbsp;<label><?php echo $this->lang->line('Sif_m'); ?></label></td>
                    <td><div class="error"><?php echo form_error('txtRoundedTimeBlock'); ?></div></td>
                </tr>
                <?php if ($txtShiftId) { ?>
                    <tr>
                        <td align="right"><label><?php echo $lblDelete; ?> </label></td>
                        <td><input type="checkbox" name="txtDelete" class="txtDelete" value="1" <?php echo ($txtDelete) ? 'checked' : ''; ?>/></td>
                        <td><div class="error"><?php echo form_error('txtDelete'); ?></div></td>
                    </tr>
                <?php } ?>
                <tr>                      
                    <td align="left" colspan="2">
                        <input type="hidden" name="txtShiftId" value="<?php echo $txtShiftId ?>" />
                        <input type="submit" name="btnSubmit" value="<?php echo $lblSubmit; ?>" />
                    </td>
                </tr>
            </table>
            <div class="clr"></div>
        </form>
    </div>
</div>
<!-- BEGIN dialog message -->
<div id="dialog" title="<?php echo $dialogTitle; ?>">
    <?php echo isset($message) ? $message : ''; ?>
</div>
<!-- END dialog message -->
<script type="text/javascript">
    $(document).ready(function() {
<?php if (isset($flag) && $flag == TRUE): ?>
            $(function() {
                $("#dialog").dialog({
                    modal: true,
                    close: function() {
                        window.location.href = '<?php echo base_url('/shift-info'); ?>';
                    },
                    buttons: [{
                            text: '<?php echo $this->lang->line('MC019'); ?>',
                            click: function() {
                                window.location.href = '<?php echo base_url('/shift-info'); ?>';
                            }
                        }],
                });
            });
<?php elseif (isset($flag) && $flag == FALSE): ?>
            $(function() {
                $("#dialog").dialog({
                    buttons: [{
                            text: '<?php echo $this->lang->line('MC019'); ?>',
                            click: function() {
                                $("#dialog").dialog('close');
                            }
                        }]
                });
            });
<?php endif; ?>
    });
</script>